package com.yeung.exam;


import java.util.Arrays;
import java.util.Scanner;

/**
 * 为了比赛公平,
 * 体重较轻者的体重值 应该>= 体重较大者的90%
 * 满足这个条件才能进行两两竞赛
 * 求最多能进行多少次比赛
 * 输入:
 * 5
 * 1 1 2 1 3
 * 输出:
 * 10
 */
public class 举重大赛 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Integer peoples = scanner.nextInt();
        int[] weights = new int[peoples];
        int index = 0;

        while (index < peoples) {
            weights[index++] = scanner.nextInt();
        }
        int enables = 0;
        Arrays.sort(weights);
        for (int i = 0; i < weights.length - 1; i++) {
            for (int j = i + 1; j < weights.length; j++) {
                int pre = weights[i];
                int suf = weights[j];
                if (pre == suf) enables += 1;
                else if (pre >= (suf * 0.9)) {
                    enables += 1;
                }
            }
        }
        System.out.println(enables);

    }
}

